home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
050
/
madtrb13.arc
/
DOSDATE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1980-01-01
|
961b
|
36 lines
VAR TDate : String[6];
ddate : string[8];
PROCEDURE DOSDate;
TYPE
regpack = record
ax,bx,cx,dx,bp,si,ds,es,flags: integer;
end;
VAR
recpack: regpack; {record for MsDos call}
month,day: string[2];
year: string[4];
dx,cx: integer;
begin
with recpack do
begin
ax := $2a shl 8;
end;
MsDos(recpack); { call function }
with recpack do
begin
str(cx,year); {convert to string}
str(dx mod 256,day); { " }
str(dx shr 8,month); { " }
end;
Year:=Copy(Year,3,2);
If Length(Month) = 1 then Month:='0'+Month;
If Length(Day) = 1 then Day:='0'+Day;
Tdate := year + month + day;
ddate := month+'/'+day+'/'+year;
end;
begin
dosdate;
writeln(tdate);
writeln(ddate);
end.